package org.jianfa.learn.dubbo.main;

import org.apache.dubbo.common.extension.ExtensionLoader;
import org.jianfa.learn.dubbo.api.HelloService;

import java.util.Set;

public class DubboMainApplication {

    public static void main(String[] args) {
        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);
        Set<String> extensions = extensionLoader.getSupportedExtensions();
        for (String extension: extensions) {
            String message = extensionLoader.getExtension(extension).sayHello("World");
            System.out.println("message: " + message);
        }
    }
}
